<template>
  <div>
    children组件
    <div>{{ modelValue }}岁</div>
  </div>
</template>

<script setup>
import { onMounted, ref, getCurrentInstance, defineModel } from 'vue';
const modelValue = defineModel();
const state = ref(12);
const instance = getCurrentInstance();
const getModuleValue = () => {
  console.log("modelValue==>", props.modelValue);
}
// defineExpose({
//   getModuleValue,
//   state
// })
onMounted(() => {
  // console.log("parent", instance.parent);
  setTimeout(() => {
    modelValue.value = 33;
  }, 1000)
})
</script>